include ../Makefile.in

SOURCES = $(wildcard *.m) $(wildcard *.mm)
OBJECTS = $(foreach file,$(patsubst %.m,%.o,$(SOURCES)),$(file)) $(foreach file,$(patsubst %.mm,%.o,$(SOURCES)),$(file))
CFLAGS += $(foreach dir,$(SRC_DIRS),-I../$(dir))

all: $(OBJECTS)

%.o: %.m
	$(CC) $(CFLAGS) -c $< -o $@

%o.: %.mm
	$(CXX) $(CFLAGS) -c $< -o $@

.PHONY : clean
clean:
	rm -f *.o
	rm -f *~
